/*
 * @Description:
 * @version:
 * @Author: sunqian_sr
 * @Date: 2022-11-21 10:04:49
 * @LastEditors: Andy
 * @LastEditTime: 2022-11-23 16:44:59
 */

const context = import.meta.glob('../../../modules/**/**/en_US.js', { eager: true })
let modulesLabels = {}
Object.keys(context).forEach((key) => {
  const files = key
  const [path, module, base, fileName] = files.replace(/(\..\/|\/module\/|\.js)/g, '').split('/')
  const tempObj = {}
  tempObj[module] = context[key].default
  modulesLabels = { ...modulesLabels, ...tempObj }
})
const lang = {
  ...modulesLabels,
  common: {}
}
export default lang
